{% extends 'base.html' %}

{% block scripts %}
  {{ block.super }}
  <script src="{{ STATIC_URL }}js/js.js" type="text/javascript"></script>
  <script type="text/javascript">js.jsRoot="{{ STATIC_URL }}js/"</script>
{% endblock %}

{% block content %}
  {% if messages %}{% for message in messages %}
    {% if message.message == 'authorization_error' %}
      <script type="text/javascript">
        js.include('rare_tools');
        UItools.showAuthError();
      </script>
    {% endif %}
    {% if message.message == 'authorization_canceled' %}
      <script type="text/javascript">
        js.include('rare_tools');
        UItools.showAuthCancelMsg();
      </script>    
    {% endif %}
    {% if message.message == 'openid_server_discovery_error' %}
      Cannot find openid server. Please go away!
    {% endif %}
  {% endfor %}{% endif %}
  <a href="{% url core.views.auth.login_openid_server 'https://www.google.com/accounts/o8/id' %}">Google</a>
  <a href="{% url core.views.auth.login_openid_server 'http://yandex.ru' %}">Yandex</a>
  <form action="" method="POST">
    {{ form.as_p }}
    <input type="submit" value="Submit">
  </form>
{% endblock %}
